package org.example.mapper;

import org.example.dto.UserDto;
import org.example.po.User;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

import java.util.List;

/**
 * @author liyishan
 * @date 2023/6/6 16:16
 * @apiNote
 */
@Mapper
public interface User1Mapper {
    @Mappings({
            @Mapping(source = "pwd",target = "password")
    })
    UserDto userToUserDto(User user);

    @Mappings({
            @Mapping(source = "pwd",target = "password")
    })
    List<UserDto> userToUserDto(List<User> users);




}
